<%@page contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="cw" uri="/widget-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>二级联动下拉框示例</title>
		<cw:base />
		<script>
			var fields = [ 'id', 'code', 'name' ];
		</script>
	</head>
	<body>
		<li>
			<b>展现一个二级联动的示例 </b>
		</li>
		<li>
			<b>数据源为字典数据，通过parentField设置上级的id </b>
		</li>
		<br>
		<br>
		<cw:form id="form" ajax="true" url="../../../../sample/form/submitFormWithLinkage2Level.action" waitMsg="提交中...">
			<table width="300">
				<tr>
					<td>
						所属行政区划：
						<cw:linkage id="first" property="district" url="../../../../sample/form/loadCodeInfo.action" />
					</td>
				</tr>
				<tr>
					<td>
						所属区县：
						<cw:linkage id="second" property="county" fields="fields" url="../../../../sample/form/loadCodeInfo.action"
							displayField="name" valueField="code" parentField="first" />
					</td>
				</tr>
			</table>
			<li>
				提交表单
				<table>
					<tr>
						<td>
							<cw:formButton actionType="submit" formId="form" />
						</td>
					</tr>
				</table>
			</li>
		</cw:form>
		<script type="text/javascript">
		 cf_r(function(){
		 	     Wonders.utils.formLoadLinkage('../../../../sample/form/getCascadeDataWith3Level.action',null,'form','../../../../sample/form/loadLinkageWith2Level.action');  
			});
</script>
	</body>
</html>
